package com.zff.rental.utils.sql.impl;

import com.zff.rental.utils.sql.*;
import lombok.Getter;

/**
 * @author HCY
 */
@Getter
public class SqlContext {
    /**
     * sql拼接结果
     */
    private final StringBuffer sql = new StringBuffer();
    // 其他上下文内容

    /**
     * 基本操作（实际实现）
     */
    private final Select select = new SelectImpl(this);
    private final From from = new FromImpl(this);
    private final Join join = new JoinImpl(this);
    private final On on = new OnImpl(this);
    private final Where where = new WhereImpl(this);
    private final ConditionConnector conditionConnector = new ConditionConnectorImpl(this);
    private final EndSql endSql = new EndSqlImpl(this);

    /**
     * 下一个操作（代理实现）
     */
    private final FromNext fromNext = new FromNextImpl(this);
    private final JoinNext joinNext = new JoinNextImpl(this);
    private final SelectNext selectNext = new SelectNextImpl(this);
    private final WhereNext whereNext = new WhereNextImpl(this);
    private final WhereConditionConnector whereConditionConnector = new WhereConditionConnectorImpl(this);
    private final JoinConditionConnector joinConditionConnector = new JoinConditionConnectorImpl(this);
}
